package com.fc.enums;


import lombok.Getter;

@Getter
public enum ReviewStatus implements IEnum {
    REVIEWING(0, "审核中"),
    APPROVE(1, "已通过"),
    REJECT(2, "驳回");

    private final int code;
    private final String description;

    ReviewStatus(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static ReviewStatus fromCode(int code) {
        for (ReviewStatus status : ReviewStatus.values()) {
            if (status.getCode() == code) {
                return status;
            }
        }
        throw new IllegalArgumentException("状态异常: " + code);
    }
}